<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var money = 100;
        do {
            var fun = parseInt(prompt("请输入您要的操作：\n1.存钱\n2.取钱\n3.显示余额\n4.退出"));
            switch (fun) {
                case 1:
                    var num = parseInt(prompt("请输入您要存的金额："));
                    if (!num) {
                        num = 0;
                    }
                    money += num;
                    alert("您的余额是：" + money)
                    break;
                case 2:
                    var num = parseInt(prompt("请输入您要取的金额："));
                    if (!num) {
                        num = 0;
                    }
                    money -= num;
                    alert("您的余额是：" + money)
                    break;
                case 3:
                    alert("您的余额是：" + money)
                    break;
            }
        } while (fun != 4)
    </script>
</body>

</html>